#!/bin/sh
#
# usage: ./runCmd cmd args..
#
# choose kernel withK=name env variable.

AFL=${TAFL:-../TriforceAFL}
KERN=${K:-kern}

if [ $# = 0 ] ; then
    ./makeRoot cmdRoot sh -i
else
    ./makeRoot cmdRoot "$@"
fi
$AFL/afl-qemu-system-trace \
    -s -L $AFL/qemu_mode/qemu/pc-bios \
    -kernel $KERN/bzImage -initrd ./cmdRoot.cpio.gz \
    -m 64M -nographic -append "console=ttyS0"

